/*
包含n个接口请求函数的模块
函数的返回值: promise对象
 */
import ajax from './ajax'
// const BASE_URL = 'http://localhost:4000'
// const BASE_URL = '/api'

//首页模块========================================================================
// 1.获取首页显示信息
export const homeInfo = (params) => ajax(`address/index/adn-index`,params)

// 公共模块

// 1、国家列表显示接口
export const countryList = () => ajax(`/address/state-manage/state`)

// 2、用户信息
export const reqUserInfo = () => ajax(`/base/login/info`)

// 历史校验模块====================================================

// 1、地址库管理 -> 详细地址列表
export const OMSDetailAddress = (params) => ajax(`/address/verify-date/list`, params)

// 3、地址库管理添加
export const OMSAdd = (addMessage) => ajax(`/address/verify-date/add`, addMessage, 'POST')
// 4、地址库管理编辑 OMSEdit
export const OMSEdit = (editMessage) => ajax(`/address/verify-date/edit`, editMessage, 'POST')
// 5、地址库管理删除 OMSDel
export const OMSDel = (delMessage) => ajax(`/address/verify-date/deletes`, delMessage, 'POST')

// 6. 手动同步 
export const OMSsame = (params) => ajax(`/address/verify-date/push-oms`, params, 'POST')

// 详细地址库模块=================================================

// 1、详细地址列表
export const DAdetailAddress = (params) => ajax(`/address/detail-address/list`, params)

// 2、 添加
export const DAAdd = (addMessage) => ajax(`/address/detail-address/add`, addMessage, 'POST')

// 3、 编辑  
export const DAEdit = (editMessage) => ajax(`/address/detail-address/edit`, editMessage, 'POST')

// 4、删除 
export const DADel = (delMessage) => ajax(`/address/detail-address/deletes`, delMessage, 'POST')

// 5、是否启用
export const DAAEnable = (EnableMessage) => ajax(`/address/detail-address/state`, EnableMessage, 'POST')



// 智能城市库管理模块==========================================================================================
// 1、城市列表
export const getCityList = (params) => ajax(`/address/city-auto-complete/list`, params)

// 2、 添加
export const AddCity = (addMessage) => ajax(`/address/city-auto-complete/add`, addMessage, 'POST')

// 3、 编辑  
export const EditCity = (editMessage) => ajax(`/address/city-auto-complete/edit`, editMessage, 'POST')

// 4、删除 
export const DelCity = (delMessage) => ajax(`/address/city-auto-complete/deletes`, delMessage, 'POST')

// 5、是否启用
export const CityEnable = (EnableMessage) => ajax(`/address/city-auto-complete/state`, EnableMessage, 'POST')


// 智能邮编库管理模块==========================================================================================

// 1、列表
export const getPostCodeList = (params) => ajax(`/address/postcode-auto-complete/list`, params)

// 2、 添加
export const AddPostCode = (addMessage) => ajax(`/address/postcode-auto-complete/add`, addMessage, 'POST')

// 3、 编辑  
export const EditPostCode = (editMessage) => ajax(`/address/postcode-auto-complete/edit`, editMessage, 'POST')

// 4、删除 
export const DelPostCode = (delMessage) => ajax(`/address/postcode-auto-complete/deletes`, delMessage, 'POST')

// 5、是否启用
export const DelPostEnable = (EnableMessage) => ajax(`/address/postcode-auto-complete/state`, EnableMessage, 'POST')

// 物流方式管理模块==========================================================================================

// 1、物流方式列表
export const getLogisticList = (params) => ajax(`/address/logistics-manage/list`, params)

// IP管理模块==============================================================================================

// 1、物流方式列表
export const getIPList = (params) => ajax(`/address/ip-manage/list`, params)
// 2、 新增
export const AddIP = (addMessage) => ajax(`/address/ip-manage/add`, addMessage, 'POST')

// 3、 编辑  
export const EditIP = (editMessage) => ajax(`/address/ip-manage/edit`, editMessage, 'POST')

// 4、删除 
export const DelIP = (delMessage) => ajax(`/address/ip-manage/deletes`, delMessage, 'POST')



// 规则管理模块=========================================================

// 1、规则管理列表
export const getRuleList = (params) => ajax(`/address/rule-manage/list`, params)
// 2、 新增
export const AddRule = (addMessage) => ajax(`/address/rule-manage/add`, addMessage, 'POST')
// 3、删除 
export const DelsRule = (delMessage) => ajax(`/address/rule-manage/deletes`, delMessage, 'POST')
// 4、导出 
export const ExportRule_URL = (num) => '/address/rule-manage/list?is_export=' + num
// 5、导入
export const ImportRule_URL = './address/rule-manage/import'

// 6、 新增
export const EditRule = (addMessage) => ajax(`/address/rule-manage/edit`, addMessage, 'POST')

// 7、 线上生效
export const onlineRule = () => ajax(`/address/rule-manage/cache`)

//8. 启用
export const enableRule = (params) => ajax(`/address/rule-manage/state`,params , "POST")

// 接口管理模块=========================================================

// 1、接口管理列表 
export const getInterfaceList = (params) => ajax(`/address/api-manage/list`, params)



// 系统日志模块====================================================

// 1、日志列表接口
export const reqLogList = (params) => ajax(`/base/admin-log/list`, params)



// 报表管理  ========================================================
//1. 地址异常报表接口
export const addersList = (params) => ajax(`/address/report-forms-manage/abn-order`, params)

//2. RMA异常报表接口
export const RMAList = (params) => ajax(`/address/report-forms-manage/abn-rma`, params)


//翻译管理 ===============================================================

//1. 列表
export const translationList = (params) => ajax(`/address/translate-manage/list`, params)

//2. 添加
export const translationAdd = (params) => ajax(`/address/translate-manage/adds`, params , 'POST')

//3. 编辑
export const translationEdit = (params) => ajax(`/address/translate-manage/edit`, params, 'POST')

//4. 详情
export const translationDetails = (params) => ajax(`/address/translate-manage/details`, params)

//5. 删除
export const translationDel = (params) => ajax(`/address/translate-manage/deletes`, params, 'POST')


//类别管理 ============================================================================

//1.查询类别  /address/translate-class-manage/list
export const categoryList = (params) => ajax(`/address/translate-class-manage/list`, params)

//1.类别添加  /address/translate-class-manage/list
export const categoryAdd = (params) => ajax(`/address/translate-class-manage/add`, params, 'POST')

//1.类别编辑  /address/translate-class-manage/list
export const categoryEdit = (params) => ajax(`/address/translate-class-manage/edit`, params, 'POST')

//1.类别详情  /address/translate-class-manage/list
export const categoryDetaiils = (params) => ajax(`/address/translate-class-manage/details`, params)

//1.类别删除  /address/translate-class-manage/list
export const categoryDel = (params) => ajax(`/address/translate-class-manage/deletes`, params, 'POST')


